﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
using QlyKinhDoanh.Utility;

namespace prjQlyKinhDoanh
{
    public partial class frmReportByNganhNghe : Form
    {
        public frmReportByNganhNghe()
        {
            InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void frmReportByArea_Load(object sender, EventArgs e)
        {
            mtbTuNgay.Text = Common.GetCurrentDate();
            mtbDenNgay.Text = Common.GetCurrentDate();
            DB_Utility.List_LoadData(cboNganhNghe, "DMNganhNghe_SelectAll", null, "ID", "TenNganhNghe", "[Tất cả]", 0);
        }

        private void btnXemBaoCao_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            ListItem selectedItem = new ListItem();
            selectedItem = (ListItem)cboNganhNghe.SelectedItem;
            frmReportByAreaViewer frm = new frmReportByAreaViewer(mtbTuNgay.Text, mtbDenNgay.Text, Common.IntValue(selectedItem.ItemData.ToString()));
            frm.ShowDialog();
            this.Cursor = Cursors.Default;
        }

    }
}